package model

import (
	"net"
	"time"
)

type Config struct {
	Ver        string
	Port       int
	Name       string
	Addr       string
	ArchiveDay int
}

type Host struct {
	Name       string
	Ip         string
	Delay      float64
	Interfaces []Interface
	Nodes      []Host
}

type Interface struct {
	Name       string
	Ip         net.IPNet
	IpRange    []net.IP
	PingStatus map[string]PingStatus
}

type PingStatus struct {
	StartTime time.Time
	EndTime   time.Time
	Duration  time.Duration
	SendPk    int
	RevcPk    int
	LossPk    int
	MinDelay  float64
	AvgDelay  float64
	MaxDelay  float64
}

type PingLog struct {
	Target   string
	LogTime  string
	MaxDelay string
	MinDelay string
	AvgDelay string
	LossPk   string
}
